home *** CD-ROM | disk | FTP | other *** search
- Path: uwm.edu!caen!hasdi
- From: hasdi@news-server.engin.umich.edu (HASDI RODZMANN HASHIM)
- Newsgroups: alt.msdos.programmer,comp.lang.c,comp.lang.pascal.misc
- Subject: typecasting preferences
- Date: 16 Apr 1996 11:58:08 GMT
- Organization: University of Michigan Engineering, Ann Arbor
- Message-ID: <4l020g$i9j@srvr1.engin.umich.edu>
- NNTP-Posting-Host: mi.engin.umich.edu
- X-Newsreader: TIN [version 1.2 PL2]
-
- Hi guys! I think my earlier post got lost so here it is again.... This is
- for a student compiler project of mine....
-
- If you have a choice, do you want the parethesis pair over the caster
- (C-style) or over the castee (Pascal-style)? eg...
-
- int a;
- float b;
-
- a = (int)b; /* cast to int */
- a = int(b); /* allowable in C++ */
-
- ...as for Pascal...
- a := integer(b); { "a" in an integer and "b" is a real }
-
- Thanx!
-
-